﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using MyHotel_DAO;
using MyHotel_DTO;
using DTO;

namespace MyHotel_DAOWS
{
    /// <summary>
    /// Summary description for ChucVuDAOWS
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class ChucVuDAOWS : System.Web.Services.WebService
    {
        ChucVuDAO _dao = new ChucVuDAO();

        [WebMethod]
        public List<ChucVu> getList()
        {
            return _dao.getList();
        }

        [WebMethod]
        public bool themChucVu(ChucVu cv)
        {

            return _dao.themChucVu(cv);
        }

        [WebMethod]
        public List<ChucVu> getListChucVuByMaNV(int maNhanVien)
        {

            return _dao.getListChucVuByMaNV(maNhanVien);
        }

        [WebMethod]
        public List<ChucVu> getListChucVuKhongDamNhiemByMaNV(int maNhanVien)
        {

            return _dao.getListChucVuKhongDamNhiemByMaNV(maNhanVien);
        }
    }
}
